package com.itheima.log;

import com.itheima.log.config.SpringConfig;
import com.itheima.log.domain.Account;
import com.itheima.log.service.AccountService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class App {
    public static void main(String[] args) {
        ApplicationContext ctx = new AnnotationConfigApplicationContext(SpringConfig.class);
        AccountService accountService = ctx.getBean(AccountService.class);

   /*     accountService.save(new Account(1,"jiaxin",888.88));*/
        Account ac = accountService.findById(1);
        System.out.println("ac = " + ac);

        // accountService.delete(3);

        // Account acc = new Account();
        // acc.setName("zhangsan");
        // acc.setMoney(1000d);
        // accountService.save(acc);
    }

}
